# _*_ coding: utf-8 _*_
# @Time     : 2022/7/23 11:17
# @Author   : dake
# @Email    : dake@2545923.com
# @File     : login_page.py
# @Software : PyCharm
from selenium.webdriver.common.by import By
from pages.base_page import BasePage

class PageLogin(BasePage):
    """登录页面类"""
    qq_locator = (By.ID, "com.gfeng.daydaycook:id/qqButton")

    def ele_qq(self):
        """点击qq登录"""
        self.driver.find_element(*self.qq_locator).click()

    def ele_accredit(self, x=550, y=1660):
        """授权qq登录"""
        self.driver.tap([(x, y)])

    def ele_login(self, x=550, y=1660):
        """登录"""
        self.driver.find_element(*self.qq_locator).click()
        self.driver.tap([(x, y)])

    def func_login(self):
        '''聚合登录'''
        self.ele_qq()
        self.ele_login()

